﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.FinanceModule.Models.Bills.CreateOrEditIncomeModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Pages_FinanceModule_Bills_Edit") + ": " + Model.Bill.SchoolName) : L("Pages_FinanceModule_Bills_Create")))
<div class="modal-body">

    <form name="ObjectForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="SchoolName" id="SchoolName"/>
        <input type="hidden" name="IncomeExpendType" id="IncomeExpendType" />
        <input type="hidden" name="BillAccount" id="BillAccount" />
        <input type="hidden" name="CheckProject" id="CheckProject" />
        <input type="hidden" name="CheckCustomer" id="CheckCustomer" />
        <input type="hidden" name="CheckUser" id="CheckUser" />
        <input type="hidden"name="BillTypeId" id="BillTypeId" value="1" />
        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.Bill.Id" />
        }
        <div class="row">
            <div class="col-xs-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("SchoolId", Model.GetSchoolList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_SchoolName")</label>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" id="BillDate" name="BillDate" value="@Model.Bill.BillDate" class="form-control edited" required />
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_BillDate")</label>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("IncomeExpendTypeId", Model.GetIETypeList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_IncomeType")</label>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("BillAccountId", Model.GetAccountList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_IncomeAccount")</label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-6">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="IncomeAmount" value="@Model.Bill.IncomeAmount" class="form-control edited" required maxlength="20" />
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_IncomeAmount")</label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    <input type="text" name="Remark" value="@Model.Bill.Remark" class="form-control edited" maxlength="@ClassroomEntity.MaxRemarkLength" />
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_Remark")</label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("CheckProjectId", Model.GetCheckProjectList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_CheckProject")</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("CheckCustomerId", Model.GetCheckCustomerList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_CheckCustomer")</label>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group form-md-line-input form-md-floating-label no-hint">
                    @Html.DropDownList("CheckUserId", Model.GetCheckStaffList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
                    <label>@L("Pages_FinanceModule_Bills_GridColumn_CheckStaff")</label>
                </div>
            </div>
        </div>



    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")
